package Practice;

import java.math.BigInteger;
import java.util.Scanner;

public class Staircase {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println(stair(n));
    }
    public static BigInteger stair(int n){
        if (n == 1) return BigInteger.ONE;
        if (n == 2) return BigInteger.valueOf(2);

        BigInteger step1 = BigInteger.ONE;
        BigInteger step2 = BigInteger.valueOf(2);
        BigInteger ans = BigInteger.ZERO;

        for (int i = 3; i <= n; i++) {
            ans = step1.add(step2);
            step1 = step2;
            step2 = ans;
        }
        return ans;
    }
}
